<?php

namespace app\admin\model;

use think\Model;

class Cooperation extends Model
{
    // 表名
    protected $name = 'cooperation';
    
    // 自动写入时间戳字段
    protected $autoWriteTimestamp = 'int';

    // 定义时间戳字段名
    protected $createTime = 'createtime';
    protected $updateTime = false;
    
    // 追加属性
    protected $append = [

    ];








    public function getStatusList()
    {
        return ['1' => __('Statuslist 1'),'2' => __('Statuslist 2'),'3' => __('Statuslist 3')];
    }

    public function buser()
    {
        return $this->belongsTo('Buser', 'buser_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }


    public function admin()
    {
        return $this->belongsTo('Admin', 'admin_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }
    public function product()
    {
        return $this->belongsTo('Product', 'product_id', 'id', [], 'LEFT')->setEagerlyType(0);
    }
}
